/**
  ******************************************************************************
  * @file   : uart.h
  * @author : 测试1组（houtiezhu）
  * @version: v0
  * @date   : 2019.07.09
  * @brief  : 
  *           
  * Copyright (C) 2019  Hangzhou SDIC Microelectronics Co., Ltd
  ******************************************************************************
**/

#ifndef UART_H
#define UART_H
#include "define.h"

#define RXIEnable  //UART_ClearFlagStatus(UART0, uint32_t UART_Flag)
#define RXIDisable
#define RXEnable	UART_Cmd(UART0,ENABLE)
#define RXDisable	UART_Cmd(UART0,DISABLE)



extern uint8   ReceiveArray[52];
extern uint8 	BTTestMode;
extern	uint8   outbyte[8]; 
extern	uint8   inbyte[8];
extern	uint8 	BPLevelType;
extern	uint8 	UartType;
extern	uint8 	KeyNumber;
extern	uint8 	VoiceType;
extern	uint8	MemorySetType;
extern	uint8	DeflateValueType;
extern	uint8 	InflateRate;
extern	uint8 	ConnectFlag;
extern	uint8   SendBuffer[5];

extern	uint8 YSYFlag;
extern	uint8 FSTime;
extern	uint8 YPTime;
extern	uint8 YSYCount;
extern	uint16 YSYPress;

extern	uint8	MaxYear;
extern	uint8 	YEARINIT;

extern	uint16  DiastolicValue; 

extern	uint16  MaxAmpValue;         
extern	uint16  DetermineValue; 


extern	uint16  InflateValue;	
extern	uint8   InflateValueSet;
extern	uint8   InflateValueCount;
extern	uint16  InflateValueMax;
extern	uint16   DeflateValueSet;

extern	uint16 	DIAGainValue;
extern	uint16 	SYSGainValue;	


extern	uint8   DeflateValue; 
extern	uint8   PulseRateDIM[33];

extern	uint8   TruePulseCount; 
extern	uint8   ResultCode; 




void Rs232_SendByte (uint8 SendData);
void User_Uart0_Init(void);
void SendPressure(void);
void Send_filter_test(void);
void Send_PulseRam(void);
void SendResult(void);
void SendResultTest(void);
void sendfunction(void);
void sendrom(void);
void SendAllMemoryData(void);
void Send_ErrorCode(void);
void Send_LowBattery(void);
void SendString( const char * TX_String);
void SendNumx(unsigned int i);


#endif 



/************************ (C) COPYRIGHT Hangzhou SDIC Microelectronics *****END OF FILE****/